<%@ Page Language="VB" MasterPageFile="~/MasterPageExpandable.master" AutoEventWireup="false" CodeFile="AdvancedSearch.aspx.vb" Inherits="Search_AdvancedSearch" title="File - Advanced Search" %>

<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc1" %>

<%@ Register Src="~/DashboardControls/DashboardPlaceHolder.ascx" TagName="SubNavPlaceHolder" TagPrefix="uc1" %>
<%@ Register Src="~/DashboardControls/DashboardPlaceHolder.ascx" TagName="DashboardPlaceHolder" TagPrefix="uc1" %>
<%@ Register Src="~/Case/caseUserInfo.ascx" TagName="caseUserInfo1" TagPrefix="uc1" %>
<%@ Register Src="~/Admin/SubNavControls/FileSubNavControl.ascx" TagName="FileSubNavPlaceHolder" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <div style="background-color: #E8ECF4; width:965px; border-bottom-style:solid; border-bottom-color:Black; border-bottom-width:1px " id="FileSubNavMenuDiv" runat="server">
        <uc1:FileSubNavPlaceHolder ID="FileSubNavControl" runat="server" />
   </div>
   
    <div style="width:940px; height:258px; overflow:auto;" runat="server" id="SearchCriteriaDiv">
        <table>
        <tr height="20"><td></td></tr>
        <tr><td width="10px"></td><td><h1>File - Search</h1></td></tr>
        <tr><td></td>
        <td>    <asp:LinkButton ID="LastSearchLinkButton" runat="server" CssClass="formLinkButton" Visible="true" Text="Last Search" CausesValidation="False" /></td></tr>
        </table>
        

        <div id="mainSearchPane" runat="server" style="width:900px;">
            <cc1:GenericInputControl ID="GenericInputControl1" runat="server" />
            <cc1:GenericInputControl ID="lblMessage" runat="server" cssClassControl="alert" />
        
            <br />

            <cc1:TextInputControl ID="LastNameTextBox" runat="server" BoundProperty="@LastName" cssClassControl="formSmall" cssClassLabel="labelSmall" Title="Last Name"/>
            
            <cc1:SSNInputControl ID="SSNTextBox" runat="server" ControlType="SSN" BoundProperty="@SSN" Value="" cssClassControl="formSmallNoWidth" cssClassLabel="labelSmall" Title="SSN" Editable="true" />

            <br />

            <cc1:TextInputControl ID="FirstNameTextBox" runat="server" BoundProperty="@FirstName" cssClassControl="formSmall" cssClassLabel="labelSmall" Title="First Name" />
            <cc1:TextInputControl ID="MedicaidNumberTextBox" runat="server" BoundProperty="@MedicaidNum" cssClassControl="formSmall" cssClassLabel="labelSmall" Title="Medicaid #" />
            <br />
            
            <cc1:DropDownInputContol ID="CountyDropDownList" runat="server" BoundProperty="@CountyID" cssClassControl="formSelectSmall" DataTextField="Description" DataValueField="CountyId" cssClassLabel="labelSmall" Title="County" />
            <cc1:DateInputControl ID="BirthDate" runat="server" BoundProperty="@DOB" cssClassControl="formSelectSmall" cssClassLabel="labelSmall" Title="D.O.B." />            
            <br />

            <cc1:TextInputControl ID="PrimaryLanguageTextBox" runat="server" BoundProperty="@PrimaryLanguage" cssClassControl="formSmall" cssClassLabel="labelSmall" Title="Primary Language" />
            <cc1:TextInputControl ID="SecondaryLanguageTextBox" runat="server" BoundProperty="@SecondaryLanguage" cssClassControl="formSmall" cssClassLabel="labelSmall" Title="Secondary Language" />
            <br />

            <cc1:DropDownInputContol ID="FileStatusDropDownList" runat="server" BoundProperty="@FileStatusID" cssClassControl="formSelectSmall" DataTextField="Description" DataValueField="CaseStatusId" cssClassLabel="labelSmall" Title="File Status" />
            <cc1:DropDownInputContol ID="SpendingPlanStatusDropDownList" runat="server" BoundProperty="@SpendingPlanStatusID" cssClassControl="formSelectSmall" DataValueField="ID" DataTextField="Description" cssClassLabel="labelSmall" Title="Spending Plan Status" />
            <br />

            <cc1:DropDownInputContol ID="FMSAAgencyDropDownList" runat="server" BoundProperty="@FMSAAgencyID" cssClassControl="formSelectSmall" DataTextField="AgencyName" DataValueField="ID" cssClassLabel="labelSmall" Title="FMSA" />
            <cc1:DropDownInputContol ID="ServiceTypeDropDownList" runat="server" BoundProperty="@ServiceTypeID" cssClassControl="formSelectSmall" DataTextField="Description" DataValueField="ID" EnableViewState="true" cssClassLabel="labelSmall" Title="Service Type" />
            <br />

            <cc1:DropDownInputContol ID="SupportBrokerAgencyDropDownList" runat="server" BoundProperty="@SupportBrokerAgencyID" cssClassControl="formSelectSmallLessWidth" DataTextField="AgencyName" DataValueField="ID" AutoPostBack="False" cssClassLabel="labelSmall" Title="Support Broker Agency" />
            <asp:Button ID="SubmitAgencyButton" runat="server" Text="Go" CssClass="formSelectSmallButton" />
            <cc1:DropDownInputContol ID="SupportBrokerDropDownList" runat="server" BoundProperty="@SupportBrokerID" cssClassControl="formSelectSmall" DataTextField="FullName" DataValueField="ID" cssClassLabel="labelSmall" Title="Support Broker" />
            <br />

            <cc1:TextInputControl ID="EmployeeLastNameTextBox" runat="server" BoundProperty="@EmpLastName" cssClassControl="formSmall" cssClassLabel="labelSmall" Title="Employee Last Name" />
            <cc1:TextInputControl ID="EmployeeFirstNameTextBox" runat="server" BoundProperty="@EmpFirstName" cssClassControl="formSmall" cssClassLabel="labelSmall" Title="Employee First Name" />
            <br />

            <cc1:DateInputControl ID="NextPlanOfCareDate" runat="server" BoundProperty="@NextPlanOfCareDate" cssClassControl="formSelectSmall" cssClassLabel="labelSmall" Title="Next Plan of Care" />
            <cc1:DateInputControl ID="NextPhoneMonitoringDate" runat="server" BoundProperty="@NextPhoneMonitoringDate" cssClassControl="formSelectSmall" cssClassLabel="labelSmall" Title="Next Phone Monitoring" />
            <br />

            <asp:Label ID="NextHomeMonitoringRadioLabel" runat="server" CssClass="labelSmall" AssociatedControlID="NextPlanOfCareRadioButtonList" />
            <asp:RadioButtonList ID="NextPlanOfCareRadioButtonList" runat="server" CssClass="formRadioSmall" RepeatDirection="Horizontal" BorderStyle="None" ToolTip="Next Plan of Care">
                <asp:ListItem>On</asp:ListItem>
                <asp:ListItem Selected="True">Before</asp:ListItem>
                <asp:ListItem>After</asp:ListItem>
            </asp:RadioButtonList>

            <asp:Label ID="NextPhoneMonitoringRadioLabel" runat="server" CssClass="labelSmall" AssociatedControlID="NextPhoneMonitoringRadioButtonList" />
            <asp:RadioButtonList ID="NextPhoneMonitoringRadioButtonList" runat="server" CssClass="formRadioSmall" RepeatDirection="Horizontal" BorderStyle="None" ToolTip="Next Phone Monitoring">
                <asp:ListItem>On</asp:ListItem>
                <asp:ListItem Selected="True">Before</asp:ListItem>
                <asp:ListItem>After</asp:ListItem>
            </asp:RadioButtonList>
            <br />

            <cc1:DateInputControl ID="NextInHomeMonitoringDate" runat="server" BoundProperty="@NextInHomeMonitoringDate" cssClassControl="formSelectSmall" cssClassLabel="labelSmall" Title="Next In-Home Monitoring" />
            <cc1:DateInputControl ID="NextAssessmentDate" runat="server" BoundProperty="@NextAssessmentDate" cssClassControl="formSelectSmall" cssClassLabel="labelSmall" Title="Next Assessment Date" />
            <br />

            <asp:Label ID="NextInHomeMonitoringRadioLabel" runat="server" CssClass="labelSmall" AssociatedControlID="NextInHomeMonitoringRadioButtonList" />
            <asp:RadioButtonList ID="NextInHomeMonitoringRadioButtonList" runat="server" CssClass="formRadioSmall" RepeatDirection="Horizontal" BorderStyle="None" ToolTip="Next In-Home Monitoring">
                <asp:ListItem>On</asp:ListItem>
                <asp:ListItem Selected="True">Before</asp:ListItem>
                <asp:ListItem>After</asp:ListItem>
            </asp:RadioButtonList>

            <asp:Label ID="NextAssessmentDateRadioLabel" runat="server" CssClass="labelSmall" AssociatedControlID="NextAssessmentDateRadioButtonList" />
            <asp:RadioButtonList ID="NextAssessmentDateRadioButtonList" runat="server" CssClass="formRadioSmall" RepeatDirection="Horizontal" BorderStyle="None" ToolTip="Next Assessment Date">
                <asp:ListItem>On</asp:ListItem>
                <asp:ListItem Selected="True">Before</asp:ListItem>
                <asp:ListItem>After</asp:ListItem>
            </asp:RadioButtonList>
            <br />

            <cc1:DropDownInputContol ID="LocalProgramOfficeDropDownList" runat="server" BoundProperty="@LocalProgramOfficeID" cssClassControl="formSelectSmall" DataTextField="LocalProgramName" DataValueField="ID" cssClassLabel="labelSmall" Title="Local Program Office" />
        </div>
    </div>
    
    <div id="NoPermissionsDiv" runat="server" style="color:Red; font-weight:bold;">
        You do not have permissions to view files in this system.  Please contact the system administrator is
        you believe that this is in error.
    </div>
    
    <div style="height:378px; width:950px; overflow:auto;" runat="server" id="SearchResultsDiv" visible="false">
        <table>
        <tr><td style="width:20px">&nbsp;</td>
            <td style="font-family:MS Sans Serif, Arial, Verdana, Sans-Serif; font-size: 1em; font-weight:bold; color:#21334B;">File - Search Results</td>
            <td style="width:500px;">&nbsp;</td>
            <td style="font-family:MS Sans Serif, Arial, Verdana, Sans-Serif; font-size:small; color:#21334B;">
            <asp:Label ID="SearchResultsCountLabel" runat="server"></asp:Label>
            </td>
            </tr>
            <tr></tr>
        </table>
                
        <cc1:ScrollingGridView ID="SearchResultsScrollingGridView" runat="server" CssClass="gridOffset" IsFixedColumn="true" AutoGenerateColumns="False" DataKeyNames="ParticipantId" CellPadding="5" BorderColor="Gray" BorderStyle="Solid" GridLines="Vertical" EmptyDataText="There were no matching files found." AllowSorting="True">
                <HeaderStyle  CssClass="headerStyle" BackColor="#949FB1" BorderColor="Gray" VerticalAlign="Top" />
                <RowStyle CssClass="columnStyle" />
                    <Columns>
                        <asp:BoundField DataField="DisplayLastNameFirst" HeaderText="Individual" SortExpression="LastName,FirstName" HeaderStyle-Width="200px" ItemStyle-Width="185px" />
                         <asp:BoundField DataField="SSNumberDisplay" HeaderText="SS #" SortExpression="SSNumber" HeaderStyle-Width="100px" ItemStyle-Width="100px" />
                        <asp:BoundField DataField="MedicaidNumber" HeaderText="Medicaid #" SortExpression="MedicaidNumber" HeaderStyle-Width="100px" ItemStyle-Width="100px" />
                        <asp:BoundField DataField="LogonId" HeaderText="ID" SortExpression="LogonId" HeaderStyle-Width="100px" ItemStyle-Width="100px" />
                        <asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status" HeaderStyle-Width="100px" ItemStyle-Width="100px" />
                        <asp:HyperLinkField DataNavigateUrlFields="ParticipantID" DataNavigateUrlFormatString="~/Case/EditFile.aspx?participantId={0}" Text="View File" AccessibleHeaderText="View File" HeaderStyle-Width="225px" ItemStyle-Width="195px" />
                    </Columns>
                <AlternatingRowStyle BackColor="#E8ECF4" />
                <EmptyDataRowStyle CssClass="alert" />
                <PagerStyle CssClass="textPlain" HorizontalAlign="Center" VerticalAlign="Middle" />
        </cc1:ScrollingGridView>
            
             <asp:HiddenField ID="QueryStringHiddenField" runat="server" />
        <asp:HiddenField ID="SortExpressionHiddenField" runat="server" />
        <asp:HiddenField ID="SortDirectionHiddenField" runat="server" />
 
    </div>
    
       
        
</asp:Content>
<asp:Content ID="FixedContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">
<center><asp:Button ID="SearchButton" runat="server" Text="Search" CssClass="formButton" />
        <asp:Button ID="ResetButton" runat="server" Text="Reset" ToolTip="Reset Form" UseSubmitBehavior="False" CssClass="formButton" />
    </center>
</asp:Content>
